#Begin MESA SR4000 hardware
OPTION(MITK_USE_TOF_MESASR4000 "Enable support for MESA SR4000" OFF)

IF(MITK_USE_TOF_MESASR4000)
  FIND_LIBRARY(MITK_MESA_LIB libMesaSR DOC "MESA access library.")
  GET_FILENAME_COMPONENT(MITK_MESA_SDK_DIR ${MITK_MESA_LIB} PATH)
  SET(MITK_MESA_SDK_DIR ${MITK_MESA_SDK_DIR}/..)
  FIND_PATH(MITK_MESA_INCLUDE_DIR libMesaSR.h ${MITK_MESA_SDK_DIR}/include DOC  "Include directory of MESA-SDK.")
  SET(MITK_TOF_AVAILABLE_CAMERAS ${MITK_TOF_AVAILABLE_CAMERAS},MESA Swissranger 4000)
  IF(WIN32)
   INSTALL(FILES ${MITK_MESA_SDK_DIR}/bin/libMesaSR.dll DESTINATION bin CONFIGURATIONS Release)
  ENDIf(WIN32)

  set(INCLUDE_DIRS_INTERNAL ${INCLUDE_DIRS_INTERNAL} ${MITK_MESA_SDK_DIR}/include)
  set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${MITK_MESA_LIB})

MITK_CREATE_MODULE(
  INCLUDE_DIRS ${MITK_BIN_DIR}
  INTERNAL_INCLUDE_DIRS ${INCLUDE_DIRS_INTERNAL}
  DEPENDS MitkToFHardware
  ADDITIONAL_LIBS ${ADDITIONAL_LIBS}
  AUTOLOAD_WITH MitkToFHardware
)
  Message("MESASR4000 Module generated")
  add_subdirectory(Testing)
ENDIF(MITK_USE_TOF_MESASR4000)
#End MESA SR4000 Hardware
